package com.mx.controller;


import com.mx.pojo.Article;
import com.mx.service.IArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author MinXu
 * @since 2021-03-03
 * QQ   754647431
 */
@Controller
public class ArticleController {

    @Autowired
    IArticleService articleService;

    @ResponseBody
    @RequestMapping("/")
    public List<Article> hello(){
        return articleService.list();
    }
}
